<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script src="jquery.js"></script>
<div id="test"></div>
<div id="test2"></div>
<input type="text" value="">
<script>
  $(document).ready(function () {
    $("#test").html('<h1>设置html</h1>');
    $("#test2").text('<h1>设置text</h1>');
    $("input").val("设置内容");
  });
</script>
</body>
</html>